//
//  CollectHeadView.m
//  Project
//
//  Created by 冯东辉 on 2018/9/20.
//  Copyright © 2018年 FengDongHui. All rights reserved.
//

#import "CollectHeadView.h"

@implementation CollectHeadView

- (id)initWithReuseIdentifier:(NSString *)reuseIdentifier {
    
    self = [super initWithReuseIdentifier:reuseIdentifier];
    
    if (self) {
        
        [self initSubViews];
    }
    
    return self;
}

- (void)initSubViews {
    
    _baseV = [[UIView alloc] initWithFrame:CGRectMake(0, 0, GET_SCREEN_WIDTH()-20, 50)];
    _baseV.backgroundColor = [UIColor clearColor];
    [self.contentView addSubview:_baseV];
    
    _lineBaseV = [[UIView alloc] initWithFrame:CGRectMake(0, 10, _baseV.width, _baseV.height-10)];
    _lineBaseV.backgroundColor = UICOLOR_HEX(0xffffffff);
    [ProjectTools setBorderWithView:_lineBaseV top:YES left:YES bottom:NO right:YES borderColor:UICOLOR_HEX(0xffEDEEEF) borderWidth:1.0f];
    [self.contentView addSubview:_lineBaseV];
    
    _colorBaseBtn = [[UIButton alloc] initWithFrame:CGRectMake(2, 2, _lineBaseV.width-4, _lineBaseV.height-2)];
//    CAGradientLayer *layer = [CAGradientLayer layer];
//    layer.frame = _colorBaseBtn.bounds;
//    [_colorBaseBtn.layer addSublayer:layer];
    [_lineBaseV addSubview:_colorBaseBtn];
    
    _iconV = [[UIImageView alloc] initWithFrame:CGRectMake(12, (_colorBaseBtn.height-25)/2.0f, 25, 25)];
    [_colorBaseBtn addSubview:_iconV];
    
    _titleL = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, _colorBaseBtn.width, _colorBaseBtn.height)];
    _titleL.textColor = UICOLOR_HEX(0xffffffff);
    _titleL.textAlignment = NSTextAlignmentCenter;
    _titleL.font = [UIFont boldSystemFontOfSize:15];
    [_colorBaseBtn addSubview:_titleL];
    
    _noteV = [[UIImageView alloc] initWithFrame:CGRectMake(_colorBaseBtn.width-9-12, (_colorBaseBtn.height-17)/2.0f, 9, 17)];
    _noteV.image = [UIImage imageNamed:@"more"];
    [_colorBaseBtn addSubview:_noteV];
    
}

@end
